package com.deep.stream.consumer.controller;

import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;
import org.springframework.messaging.Message;
import org.springframework.stereotype.Component;

/**
 * @author deeprado
 */
@Component
@EnableBinding(Sink.class)
public class ReceiveMessageController {

    @StreamListener(Sink.INPUT)
    public void input(Message<String> message) {
        System.out.println("消费者1号,---->" + message.getPayload() + "server port:8802");
    }
}
